Compile-time register requirements analysis for μTC using the GCC framework
نویسندگان
چکیده
Register allocation is one of the biggest challenges in compiler design. The allocation scheme implemented by the compiler impacts directly on the processor’s performance. The SVP model, implemented in processors supporting micro-threads, provides an alternative solution for programming the next generation of many-core chip multiprocessors. This model is captured in a new language called μTC (a system rather than an end-user language) and this paper investigates the register allocation problem when compiling μTC to microthreaded assembler. The compiler developed is based on GCC but the register allocation problem is made significantly more complex because of the requirements to manage many overlapping contexts for the lightweight threads and to keep these entirely in registers, wherever possible. This has required a very different approach to the existing GCC strategy. SVP captures both function application and loops by creating homogeneous families of blocking threads, where a thread may read and block on another’s context of synchronising variables. Because of this, the context is partitioned into four different classes: locals, globals, shareds and dependents, the latter two providing thread-to-thread communication. Before register allocation can be done, the compiler must identify variables in each class and also provide a mapping between the locals in the creating thread and the shareds and globals of the created threads (its arguments). This paper describes the problem and presents the analysis of μTC code used to predict how the variables in each class should be arranged in the thread’s context to meet the SVP model’s implementation requirements.
منابع مشابه
Compile-time stack requirements analysis with GCC
Stack overflows are a major threat to many computer applications and run-time recovery techniques are not always available or appropriate. In such situations, it is of utmost value to prevent overflows from occurring in the first place, which requires evaluating the worst case stack space requirements of an application prior to operational execution time. More generally, as run-time stack areas...
متن کاملTrace Register Allocation Policies
Register allocation is an integral part of compilation, regardless of whether a compiler aims for fast compilation or optimal code quality. State-of-the-art dynamic compilers often use global register allocation approaches such as linear scan. Recent results suggest that non-global trace-based register allocation approaches can compete with global approaches in terms of allocation quality. Inst...
متن کاملGCC .NET—a feasibility study
We examine the issues involved in producing a backend for the GNU Compiler Collection (GCC) that targets the .NET Common Language Runtime. We describe a simple back-end that is written in standard GCC style, which interfaces with the register transfer language GCC intermediate representation. We demonstrate that this simple .NET back-end is able to compile an appreciable subset of the C languag...
متن کاملConverting Intermediate Code to Assembly Code Using Declarative Machine Descriptions
Writing an optimizing back end is expensive, in part because it requires mastery of both a target machine and a compiler’s internals. We separate these concerns by isolating target-machine knowledge in declarative machine descriptions. We then analyze these descriptions to automatically generate machinespecific components of the back end. In this work, we generate a recognizer; this component, ...
متن کاملA Framework for End-to-End Evaluation of Register Allocators
We present RALF, a framework for end-to-end evaluation of register allocators. Built on top of gcc, RALF enables evaluation and comparison of register allocators in the setting of an industrialstrength compiler. RALF supports modular plug-and-play of register allocators without modifying the compiler implementation at all. RALF provides any plugged-in register allocator with an intermediate pro...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008